package com.lagou.sqlSession;

import java.util.List;

public interface SqlSession {

    <T> T getMapper(Class<?> mapperClass);

    <E> List<E> selectList(String statementId, Object... params) throws Exception;

    <T> T selectOne(String statementId, Object... params) throws Exception;

    /**
     * 对应JDBC executeUpdate方法，包含 insert / update/ delete 语句
     *
     * @param statementId
     * @param param
     * @return 影响的记录数
     * @throws Exception
     */
    int update(String statementId, Object... param) throws Exception;
}
